package cn.edu.ujn.bmis.service.imp;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import cn.edu.ujn.bmis.dao.OrderBookDao;
import cn.edu.ujn.bmis.model.OrderBook;
import cn.edu.ujn.bmis.service.OrderBookManager;

@Component("orderBookManager")
public class OrderBookManagerImp implements OrderBookManager {
	
	private OrderBookDao orderBookDao;

	public boolean addOrderBook(OrderBook orderBook) {
		
		return orderBookDao.saveOrderBook(orderBook);
	}

	public OrderBookDao getOrderBookDao() {
		return orderBookDao;
	}
	
	@Resource(name="orderBookDao")
	public void setOrderBookDao(OrderBookDao orderBookDao) {
		this.orderBookDao = orderBookDao;
	}

	public boolean updateOrderBook(String hql) {
		
		return orderBookDao.updateOrderBook(hql);
	}

	public List<OrderBook> findOrderBook(String hql) {
		return orderBookDao.findOrderBook(hql);
	}

	public boolean updateOrderBook(OrderBook orderBook) {
		return orderBookDao.updateOrderBook(orderBook);
	}
	
	

}
